import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter)

//引入主页
import Index from '../views/index.vue'

//路由表
const routes = [
    {
        path:'/',
        redirect: '/index'
    },
    {
        path:'/index',
        name:'Index',
        component:Index
    }
]


const router = new VueRouter({
    mode:'history',
    routes
})


export default router